import Cookies from 'js-cookie'
const token_key = "admin_token";

/**
 * 获取token
 * @returns 
 */
export const get_token = () => {
    return Cookies.get(token_key);
}

/**
 * 设置token
 * @param token 
 * @returns 
 */
export const set_token = (token: string) => {
    return Cookies.set(token_key, token);
}

/**
 * 移除token
 */
export const remove_token = () => {
    Cookies.remove(token_key);
}

